<?php
//让时间同步北京时间
date_default_timezone_set('Asia/Shanghai');
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

use Illuminate\Support\Facades\Route;

Route::get('/', function () {
    return view('welcome');
});
//================视图路由，视图废弃不用============================================================
//搜索主页
Route::get('/index', 'FrontEnd\Home@index');
//个人中心
Route::get('/myCenter/{user_id}', 'FrontEnd\Home@myCenter');
//显示线路页面
Route::get('/search/{id}', 'FrontEnd\Home@search');

//=====================================================前端接口路由
//登录以及注册
Route::post('/api/login', 'Api\User@login');
Route::post('/api/register', 'Api\User@register');
//修改用户信息
Route::post('/api/updateUser', 'Api\User@updateUser');
//搜索
Route::post('/api/search', 'Api\Captcha@search');

//获取网址码的详细信息
Route::post('/api/getCode', 'Api\Captcha@getCode');

// 获取用户的安全码
Route::post('/api/getUserM_list', 'Api\securityCode@getM');
// 更新安全码
Route::post('/api/updateM_list', 'Api\securityCode@updateM');
// 删除安全码
Route::post('/api/delectM_list', 'Api\securityCode@delectM');
//获取背景图片
Route::post('/api/getback', 'Api\Back@getBack');


//========================================================后端接口路由
//获取管理员界面数据
Route::post('/api/admin/index_data', 'Admin\Api@getindex_data');
//管理员的登录
Route::post('/api/admin/login', 'Admin\User@login');
//更改配置，如是否允许登录，是否允许注册
Route::post('/api/admin/setconfig', 'Admin\Api@setConfig');
//获取日志
Route::post('/api/admin/getlog', 'Admin\Api@getLog');
//获取用户列表
Route::post('/api/admin/user_list', 'Admin\Api@getUser_list');
//获取用户数据
Route::post('/api/admin/user_data', 'Admin\Api@getUser_data');
//修改安全码
Route::post('/api/admin/updatem', 'Admin\Api@updateM');
//删除主体
Route::post('/api/admin/delectm', 'Admin\Api@delectM');
//背景图片部分
Route::post('/api/admin/getback', 'Admin\Back@getBack');
Route::post('/api/admin/setback', 'Admin\Back@setBack');
Route::post('/api/admin/delectback', 'Admin\Back@delectBack');
Route::post('/api/admin/addback', 'Admin\Back@addBack');






